#include <iostream>
#include <string>
using namespace std;

int main() {
  string str1 = "jsjxsy@163.com";
  int pos = str1.find('@');
  cout << "pos = " << pos << endl;
  string name = str1.substr(0, pos);
  cout << "name = " << name << endl;
  return 0;
}